/**  

* @Title: Article.java 

* @Package com.gxbadge.model 

* @Description: TODO(用一句话描述该文件做什么) 

* @author CST

* @version V1.0  

*/ 

package com.gxbadge.model;

import java.io.Serializable;
import java.sql.Timestamp;

public class Article implements Serializable {

	private static final long serialVersionUID = -8628902771484787808L;
	private Integer artiId;
	private String title;
	private String author;
	private String source;
	private String keyWords;
	private String summary;
	private String content;
	private Timestamp uploadDate;
	private Integer clickNums;
	private Boolean hotFlag;
	private Boolean deleteFlag;
	private Boolean permFlag;
	private Integer priority;
	private Navigation nav;
	private Language lang;
	
	public Navigation getNav() {
		return nav;
	}
	public void setNav(Navigation nav) {
		this.nav = nav;
	}
	public Integer getArtiId() {
		return artiId;
	}
	public void setArtiId(Integer artiId) {
		this.artiId = artiId;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	
	public String getKeyWords() {
		return keyWords;
	}
	public void setKeyWords(String keyWords) {
		this.keyWords = keyWords;
	}
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Timestamp getUploadDate() {
		return uploadDate;
	}
	public void setUploadDate(Timestamp uploadDate) {
		this.uploadDate = uploadDate;
	}
	public Integer getClickNums() {
		return clickNums;
	}
	public void setClickNums(Integer clickNums) {
		this.clickNums = clickNums;
	}
	public Boolean getHotFlag() {
		return hotFlag;
	}
	public void setHotFlag(Boolean hotFlag) {
		this.hotFlag = hotFlag;
	}
	public Boolean getDeleteFlag() {
		return deleteFlag;
	}
	public void setDeleteFlag(Boolean deleteFlag) {
		this.deleteFlag = deleteFlag;
	}
	public Boolean getPermFlag() {
		return permFlag;
	}
	public void setPermFlag(Boolean permFlag) {
		this.permFlag = permFlag;
	}
	
	public Language getLang() {
		return lang;
	}
	public void setLang(Language lang) {
		this.lang = lang;
	}
	
	public Integer getPriority() {
		return priority;
	}
	public void setPriority(Integer priority) {
		this.priority = priority;
	}
	public Article(){
		
	}
	public Article(Integer artiId, String title, String author, String source, String keyWords,
			String summary, String content, Timestamp uploadDate,
			Integer clickNums, Boolean hotFlag, Boolean deleteFlag,
			Boolean permFlag, Navigation nav, Language lang, int priority) {
		super();
		this.artiId = artiId;
		this.title = title;
		this.author = author;
		this.source = source;
		this.keyWords = keyWords;
		this.summary = summary;
		this.content = content;
		this.uploadDate = uploadDate;
		this.clickNums = clickNums;
		this.hotFlag = hotFlag;
		this.deleteFlag = deleteFlag;
		this.permFlag = permFlag;
		this.nav = nav;
		this.lang = lang;
		this.priority = priority;
	}
	
	public boolean equals(Object obj){
		
		if (this == obj){
			return true;
		}
		if (obj != null && obj.getClass() == Article.class){
			Article arti = (Article)obj;
			return this.getArtiId().equals(arti.getArtiId()) && this.getTitle().equals(arti.getTitle()) && this.getUploadDate().equals(arti.getUploadDate())
				&& this.getNav().equals(arti.getNav());
		}
		return false;

	}
	
	public int hashcode(){
		
		return this.getArtiId().hashCode()+this.getTitle().hashCode()+this.getUploadDate().hashCode() + this.getNav().hashcode();
		
	}
	
	public String toString(){
		
		return this.getArtiId().toString()+"--"+this.getTitle().toString()+"--"+this.getUploadDate().toString()+"---"+this.getNav().toString();

	}
	
}
